﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace CodeSnippetsEditor
{
    public class ClassPlaceholder
    {
        private string name = string.Empty;
        private string type = string.Empty;
        private string defaultValue = string.Empty;
        private string tooltip = string.Empty;
        private string function = string.Empty;

        private bool editable;

        /// <summary>
        /// Initializes a new instance of the <see cref="ClassPlaceholder"/> class.
        /// </summary>
        public ClassPlaceholder()
        { }

        /// <summary>
        /// Initializes a new instance of the <see cref="ClassPlaceholder"/> class.
        /// </summary>
        /// <param name="_id">The _id.</param>
        /// <param name="_type">The _type.</param>
        /// <param name="_default">The _default.</param>
        /// <param name="_tooltip">The _tooltip.</param>
        /// <param name="_function">The _function.</param>
        /// <param name="_editable">if set to <c>true</c> [_editable].</param>
        public ClassPlaceholder(string _id, string _type, string _default, string _tooltip, string _function, bool _editable)
        {
            ID = _id;
            Type = _type;
            Default = _default;
            ToolTip = _tooltip;
            Function = _function;
            Editable = _editable;
        }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>The name.</value>
        [XmlElement()]
        public string ID
        {
            get 
            {
                return name;
            }
            set
            {
                name = value;
            }
        }

        /// <summary>
        /// Gets or sets the type.
        /// </summary>
        /// <value>The type.</value>
        [XmlElement()]
        public string Type
        {
            get
            {
                return type;
            }
            set
            {
                type = value;
            }
        }

        /// <summary>
        /// Gets or sets the default value.
        /// </summary>
        /// <value>The default value.</value>
        [XmlElement()]
        public string Default
        {
            get
            {
                return defaultValue;
            }
            set
            {
                defaultValue = value;
            }
        }

        /// <summary>
        /// Gets or sets the tool tip.
        /// </summary>
        /// <value>The tool tip.</value>
        [XmlElement()]
        public string ToolTip
        {
            get
            {
                return tooltip;
            }
            set
            {
                tooltip = value;
            }
        }

        /// <summary>
        /// Gets or sets the function.
        /// </summary>
        /// <value>The function.</value>
        [XmlElement()]
        public string Function
        {
            get
            {
                return function;
            }
            set
            {
                function = value;
            }
        }

        /// <summary>
        /// Gets or sets a value indicating whether this <see cref="ClassPlaceholder"/> is editable.
        /// </summary>
        /// <value><c>true</c> if editable; otherwise, <c>false</c>.</value>
        [XmlAttribute()]
        public bool Editable
        {
            get
            {
                return editable;
            }
            set
            {
                editable = value;
            }
        }
    }
}
